package com.ethink.framework.common.util;

import cn.hutool.extra.spring.SpringUtil;
import com.ethink.framework.common.validate.properties.ValidateProperties;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 常用工具类
 *
 * @author yunduo
 */
public class CommonUtils {

    /**
     * 判断是否是手机号
     *
     * @param value
     * @return
     */
    public static boolean isMobile(String value) {
        Matcher match = Pattern.compile(SpringUtil.getBean(ValidateProperties.class).getMobilePattern()).matcher(value);
        return match.matches();
    }


}
